package algorithm.leetCode.other;

public class Solutions {
    public static int[] twoSum(int[] nums, int target) {
        int[] x=new int[2];
        x[0]=0;
        x[1]=0;
        int a=nums.length;
        for(int i=0;i<a;i++)
            for(int j=0;j<a;j++)
                if(nums[i]+nums[j]==target){
                    x[0]=i;
                    x[1]=j;
                    return x;
                }
        return x;
    }
    public static void main(String[] args){
    	int[] a={6,2,8};
    	int[] x=twoSum(a,10);
    	for(int i=0;i<x.length;i++){
    		System.out.print(x[i]);
    	}
    }
}
